package cn.bitkit.base.exception;

import cn.bitkit.base.constants.BasicApiCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;

@Getter
@Setter
public class BusinessException extends RuntimeException {
    /**
	 * 
	 */
	@Serial
    private static final long serialVersionUID = 1L;

	private int errorCode = BasicApiCode.FAIL.code;
	private String errorMsg = BasicApiCode.FAIL.desc;
	
    public BusinessException() {
        super();
    }

    public BusinessException(String errorMsg) {
        super(errorMsg);
        this.errorMsg = errorMsg;
    }

    public BusinessException(int errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

}
